home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Night Owl 6
/
Night Owl's Shareware - PDSI-006 - Night Owl Corp (1990).iso
/
023a
/
managr.zip
/
FILE-MAN.ASI
next >
Wrap
Text File
|
1992-01-07
|
30KB
|
1,625 lines
rem FILE-MAN.COM
rem consecutive to wait22:
rem initialize Esc key. This is necessary because some parameters go directly
rem to a routine; if it wasn't initialized here, it would have to be re-
rem initialized in every routine in which it was used. CHR$(27) is the ASCII
rem code for the Esc key.
b$=chr$(27)
rem initialize Enter (Return) key. Same reason as the Esc key initialization,
rem but applies mainly to the error routines. CHR$(13) is the ASCII code for
rem the Enter (Return) key.
c$=chr$(13)
rem Again, for the error routines, initialize the Backspace key and space bar.
d$=chr$(8)
e$=chr$(32)
lf$=chr$(10)
crlf$=c$+lf$
rem a=csrline (this is reserved in the subroutine CURSOR:)
rem b=pos(0) (also reserved in CURSOR: subroutine)
rem c=b-1 (reserved in CURSOR: subroutine)
rem This program requires approximately 68K of RAM.
rem Now, check for parameters. The first set is for 80-column mode.
a$=command$
if a$=" /?" then help:
if a$=" /d" then killfile:
if a$=" /D" then killfile:
if a$=" /m" then makedir:
if a$=" /M" then makedir:
if a$=" /n" then renfile:
if a$=" /N" then renfile:
if a$=" /g" then timedate:
if a$=" /G" then timedate:
if a$=" /b" then
gosub blankscr:
goto menu:
endif
if a$=" /B" then
gosub blankscr:
goto menu:
endif
if a$=" /p" then chckgrph:
if a$=" /P" then chckgrph:
if a$=" /s" then
call ("seefiles.com","")
goto menu:
endif
if a$=" /S" then
call ("seefiles.com","")
goto menu:
endif
if a$=" /v" then readfile:
if a$=" /V" then readfile:
if a$=" /l" then printfil:
if a$=" /L" then printfil:
rem This set of parameters is for 40-column mode.
if a$=" /40" then menu40:
if a$=" /40 ?" then help40:
if a$=" /40 d" then killfl40:
if a$=" /40 D" then killfl40:
if a$=" /40 m" then makedr40:
if a$=" /40 M" then makedr40:
if a$=" /40 n" then renfil40:
if a$=" /40 N" then renfil40:
if a$=" /40 g" then timedt40:
if a$=" /40 G" then timedt40:
if a$=" /40 b" then
gosub blankscr:
goto menu40:
endif
if a$=" /40 B" then
gosub blankscr:
goto menu40:
endif
if a$=" /40 s" then
call ("seefiles.com","/40")
goto menu40:
endif
if a$=" /40 S" then
call ("seefiles.com","/40")
goto menu40:
endif
if a$=" /40 l" then prfile40:
if a$=" /40 L" then prfile40:
rem If no parameters, begin from the beginning.
rem Set up and print intro screen.
cls
print " The ASIC File Manager, Version 2.00"
print
print
print " By Matt Roberts"
print " 3 Cedar St., #8"
print " Montpelier, Vt 05602-3006"
print " (802)223-2553"
print
print
print " If you find the programs on this disk useful, a donation of"
print " $5.00 would be greatly appreciated. Thanks."
print
print
print " If you're having trouble using this program, you can call"
print " between 9AM and 9PM (EST), and I'll try to help."
print
print
print
print
print
print
print
print "Press any key to continue. ";
gosub continue:
rem Intro screen is now printed.
rem Here's the Caveat.
cls
print "Please note: I am not in any way connected to ASIC or its author,"
print "David A. Visti, except as a registered user and ardent fan. Inquiries"
print "regarding ASIC, and registration fees for that compiler, should be"
print "sent to:"
print
print
print "David Visti, P.O. Box 2952, Raleigh, NC 27602-2952."
print
print
print "I urge you to consider ASIC, and to register it if you use it."
print "Thanks."
print
print
print
print
print
print
print
print "Press any key to continue. ";
gosub continue:
rem Now direct the program to create a menu of options.
rem Here is the menu of options.
menu:
cls
print " Your Options"
print
print
print "F1- View Files. F10- Read file."
print
print "F2- Delete Files. <Alt-F1>- Print file."
print
print "F3- Make Directory. <Alt-F2>- See DOS Parameters."
print
print "F4- Rename Files. <Alt-F3>- Work with CONFIG.SYS."
print
print "F5- Get Time/Date. <Alt-F4>- Work with AUTOEXEC.BAT."
print
print "F6- Shell to DOS. <Alt-F5>- Run Other Programs."
print
print "F7- Blank Screen. <Alt-F6>- Remove Directory."
print
print "F8- Check for Graphics Card. N- Next Menu."
print
print "F9- Change to 40-column mode. Esc- Quit and Return to DOS."
print
print
print "Please press the key corresponding to your choice. ";
wait2:
gosub continue:
if a$=b$ then
cls
end
endif
if a$="n" then menu2:
if a$="N" then menu2:
if extended=0 then wait2:
if a$=";" then
call ("seefiles.com","")
endif
if a$="<" then killfile:
if a$="=" then makedir:
if a$=">" then renfile:
if a$="?" then timedate:
if a$="@" then shelldos:
if a$="A" then
gosub blankscr:
endif
if a$="B" then chckgrph:
if a$="C" then menu40:
if a$="D" then readfile:
if a$="h" then printfil:
if a$="i" then help:
if a$="j" then
call ("config.bas","")
endif
if a$="k" then
call ("autoexec.bas","")
endif
if a$="l" then runother:
if a$="m" then removedr:
goto wait2:
menu2:
cls
print " More Options"
print
print
print "<Alt-F7>- Copy a file."
print
print "<Alt-F8>- Move a file."
print
print "F- First Menu."
print
print "Esc- Quit and Return to DOS."
print
print
print "Please press the key corresponding to your choice. ";
gosub continue:
wait:
if a$=b$ then
cls
end
endif
if a$="f" then menu:
if a$="F" then menu:
if extended=0 then wait:
if a$="n" then copyfile:
if a$="o" then movefile:
goto wait:
rem Here is the routine for deleting files.
killfile:
cls
print " Delete Files"
print
print
print "Before going any further, you should be aware that, once a file has"
print "been deleted, it is very difficult to retrieve it. From this program,"
print "it is impossible; I lack the skill to make an undelete feature"
print "available."
print
print
print "Press any key to continue, or Esc to quit. ";
wait4:
gosub continue:
if a$=b$ then menu:
deletagn:
cls
print " Delete Files"
print
print
spaces$=space$(68)
print spaces$;
color 0,7
print "Esc=Quit"
color 7,0
print "File to delete? ";
gosub retypefi:
print ""
print ""
print ""
print "All the data in ";
print realfile$;
print " will be destroyed."
print
print
print "Press any key to continue, or Esc to quit. ";
wait5:
gosub continue:
if a$=b$ then menu:
rekill:
kill file$
if error=2 then nofilekf:
if error=5 then illeglkf:
print ""
print ""
print realfile$;
print " has been deleted."
file$=""
print
print "Delete another? (y/n) ";
wait6:
gosub continue:
if a$="y" then deletagn:
if a$="Y" then deletagn:
if a$="n" then menu:
if a$="N" then menu:
goto wait6:
rem This is the end of the routine for deleting files.
rem Here is the routine for making a directory.
makedir:
cls
print " Make a Directory"
print
print
spaces$=space$(68)
print spaces$;
color 0,7
print "Esc=Quit"
color 7,0
print "Type directory name (include drive and path). ";
gosub retypefi:
directory$=file$
remakedr:
mkdir directory$
if error=3 then nopathmd:
if error=5 then illeglmd:
print ""
print ""
realdir$=ucase$(directory$)
print "You have created directory: ";
print realdir$
directory$=""
print
print
print "Would you like to make another directory? (y/n) ";
wait7:
gosub continue:
if a$="y" then makedir:
if a$="Y" then makedir:
if a$="n" then menu:
if a$="N" then menu:
goto wait7:
rem This is the end of the routine for making directories.
rem Here is the routine for renaming files.
renfile:
cls
print " Rename Files"
print
print
spaces$=space$(68)
print spaces$;
color 0,7
print "Esc=Quit"
color 7,0
print "Name of file to change (include drive and path)? ";
gosub retypefi:
file1$=file$
realfile1$=ucase$(file1$)
dofile2:
print ""
print ""
print ""
print "New name for ";
print realfil1$;
print "? ";
file$=""
gosub retypefi:
file2$=file$
realfil2$=ucase$(file2$)
refile:
name file1$ as file2$
if error=2 then nofilerf:
if error=3 then nopathrf:
if error=5 then illeglrf:
if error=17 then diffdrrf:
print ""
print ""
print realfil1$;
print " has been renamed ";
print realfil2$;
print "."
file1$=""
file2$=""
print
print "Rename another? (y/n) ";
wait8:
gosub continue:
if a$="y" then renfile:
if a$="Y" then renfile:
if a$="n" then menu:
if a$="N" then menu:
goto wait8:
rem This is the end of the routine for renaming files.
rem Here is the routine for getting the time and/or date.
timedate:
cls
print " Get Time and/or Date."
print
print
print "Here are your options:"
print
print
print "F1- Get the time."
print
print "F2- Get the date."
print
print "F3- Get Both."
print
print "Esc- Return to the Main Options Menu."
print
print
print
print "Please press the key corresponding to your choice. ";
wait20:
gosub continue:
if a$=b$ then menu:
if extended=0 then wait20:
if a$=";" then gettime:
if a$="<" then getdate:
if a$="=" then getboth:
goto wait20:
gettime:
cls
print " Get the Time."
print
print
print "In order for this feature to work, the time in your computer must be"
print "set properly, either manually or with the Real-Time-Clock."
print
print
print
print
print
a$=time$
f$=mid$(a$,1,2)
d=val(f$)
if d>12 then
d=d-12
h$=" PM"
else
h$=" AM"
endif
if d=12 then
h$=" PM"
endif
e=d
g$=str$(e)
i$=mid$(a$,3,6)
j$=g$+i$
k$=ltrim$(j$)
print "The time is now: ";
print k$;
print h$
print
print
print "Press any key to continue. ";
gosub continue:
goto timedate:
getdate:
cls
print " Get the Date"
print
print
print "In order for this feature to work properly, the date in your computer"
print "must be set properly. If it isn't, you may get a weird date."
print
print
print
print
print
a$=date$
print "Today's date is ";
print a$
print
print
print "Press any key to continue. ";
gosub continue:
goto timedate:
getboth:
cls
print " Get Both"
print
print
print "In order for this feature to work, both your time and date must be set"
print "properly. If they aren't, you may get some weird answers. If you"
print "have problems, check your manual to find out how to set the time and"
print "date from DOS."
print
print
print
print
print
a$=time$
f$=mid$(a$,1,2)
d=val(f$)
if d>12 then
d=d-12
h$=" PM"
else
h$=" AM"
endif
if d=12 then
h$=" PM"
endif
e=d
g$=str$(e)
i$=mid$(a$,3,6)
j$=g$+i$
k$=ltrim$(j$)
print "The time is now: ";
print k$;
print h$
print
print
f$=date$
print "Today's date is ";
print f$
print
print
print "Press any key to continue. ";
gosub continue:
goto timedate:
rem This is the end of the routine for getting the time and/or date.
rem Here is the routine for shelling to DOS.
shelldos:
cls
print " Shell to DOS"
print
print
print "On which drive is your COMMAND.COM (don't type the colon)? ";
wait9:
gosub continue:
print a$
path$=a$+":\command.com"
cls
print "Use the DOS command EXIT to return to the File Manager."
print
call path$,""
if error=255 then nocall:
goto menu:
rem This is the end of the routine for shelling to DOS.
rem Here is the routine for blanking your screen.
blankscr:
cls
locate 81,81
gosub continue:
return
rem This is the end of the routine for blanking your screen.
rem Here is the routine for checking for a graphics card.
chckgrph:
cls
print " Check for a Graphics Adaptor"
print
print
print "This program only has the ability to check whether or not you have a"
print "graphics adapter. It can't tell you what kind of adapter you have"
print "at this time."
print
print
print
d=zmode
if d=1 then graphics: else nogrphcs:
graphics:
print "You have a graphics adapter installed."
print
print
print "Press any key to continue. ";
gosub continue:
goto menu:
nogrphcs:
print "There is no graphics adapter installed. However, you may be able to"
print "access special line-drawing characters for making menus, as well as"
print "some other characters (such as smiley faces). Check your DOS or word"
print "processing manual for details."
print
print
print "Press any key to continue. ";
gosub continue:
goto menu:
rem This is the end of the routine for checking for a graphics card.
rem Here are the screens for accessing FILE-MAN from DOS with parameters
rem (80 columns).
help:
cls
print "You can use arguments with the File Manager if you wish; they may help"
print "save you time."
print
print
print "Just typing FILE-MAN at the DOS prompt will start the File Manager from"
print "the beginning; you can choose your options from the menu."
print
print "Typing FILE-MAN /? gives you this help screen."
print
print "Typing FILE-MAN /d moves you directly to the Delete Files option."
print
print "Typing FILE-MAN /m moves you directly to the Make Directory option."
print
print "Typing FILE-MAN /n moves you directly to the Rename Files option."
print
print "Typing FILE-MAN /g moves you directly to the Get Date option."
print
print "Typing FILE-MAN /b blanks your screen."
print
print "Typing FILE-MAN /p checks for a graphics adaptor."
print
print
print "Press any key to continue. ";
gosub continue:
cls
print "Typing FILE-MAN /s lets you see a list of disk files."
print
print "Typing FILE-MAN /v lets you view the text file of your choice, on the"
print "screen."
print
print "Typing FILE-MAN /l lets you print a file on the lineprinter."
print
print
print "Upper or lower case makes no difference."
print
print
print "Do you want to ";
color 0,15
print "C";
color 7,0
print "ontinue with the File Manager or Return to ";
color 0,15
print "D";
color 7,0
print "OS? ";
print
print
print "Please press the key corresponding to your choice. ";
wait11:
gosub continue:
if a$="c" then menu:
if a$="C" then menu:
if a$="d" then
cls
end
endif
if a$="D" then
cls
end
endif
goto wait11:
rem This is the end of the routine for the list of DOS parameters.
rem Here is the routine for reading a file.
readfile:
cls
print " Read a File"
print
print
spaces$=space$(68)
print spaces$;
color 0,7
print "Esc=Quit"
color 7,0
print "Please type the name of the file you want to read."
print "Include drive and path. ";
gosub retypefi:
print ""
print ""
print "To pause the scrolling, press the space bar. To quit, press Esc."
print
print
print "While the file should be readable, formatting may not be quite"
print "correct."
print
print
print "Press any key to continue. ";
gosub continue:
a$=""
cls
reread:
open "i",1,file$
if error=2 then
gosub nofilerd:
goto reread:
endif
if error=3 then nopathrd:
readmore:
input# 1, line$ crlf
if error=96 then
print line$
line=line+1
if line=23 then
print "Press any key to continue. ";
gosub continue:
print
print
line=0
cls
endif
gosub blanklnr:
endif
line=line+1
if line=23 then
print ""
print "Press any key to continue. ";
gosub continue:
print
print
if a$=b$ then
line=0
file$=""
close 1
print
print
print "Do you want to view another file? (y/n) ";
goto wait56:
endif
line=0
cls
endif
print line$
a$=inkey$
if a$=e$ then
print "Press any key to continue. ";
gosub continue:
print
print
endif
if a$=b$ then
file$=""
line=0
close 1
print
print
print "Do you want to view another file? (y/n) ";
goto wait56:
endif
if error=99 then eof:
goto readmore:
blanklnr:
input# 1, line$ crlf
if line$="" then readmore:
return
eof:
print line$
print "Press any key to continue. ";
gosub continue:
print
print
line=0
file$=""
close 1
print
print
print "Do you want to view another file? (y/n) ";
wait56:
gosub continue:
if a$="y" then readfile:
if a$="Y" then readfile:
if a$="n" then menu:
if a$="N" then menu:
goto wait56:
rem This is the end of the routine for reading text files.
rem Here is the routine for printing text files.
printfil:
cls
print " Print a File"
print
print
spaces$=space$(68)
print spaces$;
color 0,7
print "Esc=Quit"
color 7,0
print "Please type the name of the file you want to print."
print
print "Include the drive and path. ";
gosub retypefi:
doprintf:
f$=chr$(12)
open "i",1,file$
if error=2 then
gosub nofilerd:
goto doprintf:
endif
if error=3 then nopathpr:
heading:
cls
print "Printing...";
realfile$=ucase$(file$)
color 0,7
print realfile$
color 7,0
print
print
print "Press space bar to pause printing, or Esc to quit."
print
print
printmor:
input# 1, line$ crlf
if error=96 then
lprint line$
goto blanklin:
endif
contlprn:
lprint line$
a$=inkey$
if a$=b$ then
print "Printing has been terminated. The printer may still have data in its"
print "buffer. If so, it will continue printing until the buffer is empty."
lprint f$
close 1
file$=""
print
print
print "Print another file? (y/n) ";
goto wait13:
endif
if a$=e$ then
print "Press any key to resume printing. ";
gosub continue:
endif
if error=99 then eofp:
goto printmor:
blanklin:
input# 1, line$ crlf
if line$="" then printmor: else contlprn:
eofp:
lprint line$
print "Finished."
close 1
lprint f$
file$=""
print
print
print "Print another file? (y/n) ";
wait13:
gosub continue:
if a$="y" then printfil:
if a$="Y" then printfil:
if a$="n" then menu:
if a$="N" then menu:
goto wait13:
rem This is the end of the routine for printing text files.
rem Here is the routine for running other programs.
runother:
cls
spaces$=space$(68)
print spaces$;
color 0,7
print "Esc=Quit"
color 7,0
print
print "Please type the full name of the program you want to run (for example,"
print "MYPROGRM.COM). Include the drive and path."
gosub retypefi:
print ""
print "You can specify an argument to your program, but it must be one phrase"
print "(no spaces). Do you want to specify an argument (y/n)";
wait25:
gosub continue:
if a$="y" then getargum:
if a$="Y" then getargum:
if a$="n" then
argument$=""
goto dorunoth:
endif
if a$="N" then
argument$=""
goto dorunoth:
endif
goto wait25:
getargum:
cls
spaces$=space$(68)
print spaces$;
color 0,7
print "Esc=Quit"
color 7,0
print
print "Please type the argument you'd like to use. It can only be one phrase"
print "and cannot contain any spaces. ";
dorunoth:
argument$=file$
argument$=e$+argument$
call file$,argument$
file$=""
argument$=""
cls
print "Would you like to run another program (y/n)? ";
wait30:
gosub continue:
if a$="y" then runother:
if a$="Y" then runother:
if a$="n" then menu:
if a$="N" then menu:
goto wait30:
rem This is the end of the routine for running other programs.
rem Here is the routine for removing directories.
removedr:
cls
print " Remove Directories"
print
print
spaces$=space$(68)
print spaces$;
color 0,7
print "Esc=Quit"
color 7,0
print
print "Before you can remove a directory, you must remove all files in that"
print "directory, and in its subdirectories. You must then remove all sub-"
print "directories."
print
print
removagn:
print "Please type the name of the directory you'd like to remove. Include"
print "the drive and path. ";
gosub retypefi:
directory$=file$
reremove:
rmdir directory$
realfile$=ucase$(directory$)
print ""
print ""
print realfile$;
print " has been removed."
print ""
print ""
print "Would you like to remove another directory? ";
wait40:
gosub continue:
if a$="y" then removagn:
if a$="Y" then removagn:
if a$="n" then menu:
if a$="N" then menu:
goto wait40:
rem This is the end of the routine for removing directories.
rem Here is the routine for copying text files.
copyfile:
cls
print " Copy File"
print
print
print "*****PLEASE NOTE***** Only text files will copy properly using this"
print "method. Files with an extension of .EXE, .COM, or which contain other"
print "special characters will usually not copy properly."
print
print "Press any key to continue. ";
gosub continue:
copymore:
cls
spaces$=space$(68)
print spaces$;
color 0,7
print "Esc=Quit"
color 7,0
print
print "File to copy (include drive and path)? ";
gosub retypefi:
file1$=file$
file$=""
realfil1$=ucase$(file1$)
print ""
print "Destination (include drive and path)? ";
gosub retypefi:
file2$=file$
realfil2$=ucase$(file2$)
open "i",1,file1$
open "o",2,file2$
wait3:
input # 1, line$ crlf
if error=99 then copydone:
if error=96 then
print # 2, line$ nonull
input # 1, line$ crlf
if line$="" then
print # 2, crlf$ nonull
goto wait3:
endif
endif
print # 2, line$ nonull
print # 2, crlf$ nonull
goto wait3:
copydone:
close 1
close 2
print ""
print ""
print realfil1$;
print " has been copied to ";
print realfil2$;
print "."
print
print "Copy another? ";
wait46:
gosub continue:
if a$="y" then copymore:
if a$="Y" then copymore:
if a$="n" then menu2:
if a$="N" then menu2:
goto wait46:
rem This is the end of the routine for copying a text file.
rem Here is the routine for moving text files.
movefile:
cls
print " Move File"
print
print
print "*****PLEASE NOTE***** Only text files will move properly using this"
print "method. Files with an extension of .EXE, .COM, or which contain other"
print "special characters will usually not move properly. In addition, this"
print "option is destructive, destroying the original file. You are urged"
print "to make backups before attempting any procedure which can change a"
print "file."
print
print "Press Esc to quit, or any other key to continue. ";
gosub continue:
if a$=b$ then menu2:
movemore:
cls
spaces$=space$(68)
print spaces$;
color 0,7
print "Esc=Quit"
color 7,0
print "File to copy (include drive and path)? ";
gosub retypefi:
file1$=file$
realfil1$=ucase$(file1$)
file$=""
print ""
print "Destination (include drive and path)? ";
gosub retypefi:
file2$=file$
realfil2$=ucase$(file2$)
file$=""
domove:
open "i",1,file1$
open "o",2,file2$
wait26:
input # 1, line$ crlf
if error=99 then movedone:
if error=96 then
print # 2, line$ nonull
input # 1, line$ crlf
if line$="" then
print # 2, crlf$ nonull
goto wait26:
endif
endif
print # 2, line$ nonull
print # 2, crlf$ nonull
goto wait26:
movedone:
close 1
close 2
kill file1$
print ""
print ""
print realfil1$;
print " has been moved to ";
print realfil2$;
print "."
print
print "Move another? ";
wait29:
gosub continue:
if a$="y" then movemore:
if a$="Y" then movemore:
if a$="n" then menu2:
if a$="N" then menu2:
goto wait29:
rem This is the end of the routine for moving a file.
rem Here is the routine for typing in files in 80-column mode.
retypefi:
gosub continue:
if a$=b$ then
file$=""
file1$=""
file2$=""
goto menu:
endif
if a$=c$ then
return
endif
gosub cursor:
if a$=d$ then
locate a,c
print e$;
locate a,c
d=len(file$)
e=d-1
file$=mid$(file$,1,e)
if e<0 then
e=0
c=c+1
locate a,c
endif
if b=0 then
a=a-1
b=79
locate a,b
print e$;
locate a,b
endif
goto retypefi:
endif
print a$;
file$=file$+a$
realfile$=ucase$(file$)
goto retypefi:
rem This is the end of the routine for typing in files in 80-column mode.
rem Here is the routine for typing in files in 40-column mode.
retypf40:
gosub continue:
if a$=b$ then
file$=""
file1$=""
file2$=""
goto menu40:
endif
if a$=c$ then
return
endif
gosub cursor:
if a$=d$ then
locate a,c
print e$;
locate a,c
d=len(file$)
e=d-1
file$=mid$(file$,1,e)
if e<0 then
e=0
c=c+1
locate a,c
endif
if b=0 then
a=a-1
b=38
locate a,b
print e$;
locate a,b
endif
goto retypf40:
endif
print a$;
file$=file$+a$
goto retypf40:
rem This is the end of the routine for typing in files in 40-column mode.
rem Here is the routine for continuing when the user presses a key.
continue:
a$=inkey$
if a$="" then continue:
return
rem This is the end of the routine for continuing when the user presses a key.
rem Here is the subroutine for initializing row/column position of cursor.
cursor:
a=csrlin
b=pos(0)
c=b-1
return
rem This is the end of the routine for initializing cursor position.
rem Here is the routine for generating 40-column width for visually impaired
rem people.
rem In order to make certain the screen writes are readable, the entire program
rem is essentially rewritten in this module.
menu40:
width 40
print "Your Options:"
print
print
print "F1- View Your Files."
print
print "F2- Delete Files."
print
print "F3- Make a directory."
print
print "F4- Rename Files."
print
print "F5- Get the Time/Date."
print
print "F6- Shell to DOS."
print
print "F7- Blank Your Screen."
print
print "F8- Next menu."
print
print "Esc- Quit."
print
print
print "Please press the key corresponding to"
print "your choice. ";
wait12:
gosub continue:
if a$=b$ then
cls
end
endif
if extended=0 then wait12:
if a$=";" then
call ("seefiles.com","/40")
endif
if a$="<" then killfl40:
if a$="=" then makedr40:
if a$=">" then renfil40:
if a$="?" then timedt40:
if a$="@" then shell40:
if a$="A" then
gosub blankscr:
endif
if a$="B" then 2dmenu40:
goto wait12:
2dmenu40:
cls
print "Here are your remaining options:"
print
print
print "F1- Change to 80-column mode."
print
print "F2- Print file."
print
print "F3- Return to the first menu."
print
print "F4- See a list of parameters you can"
print "use from DOS."
print
print "Esc- Quit."
print
print
print "Please press the key corresponding to"
print "your choice. ";
wait58:
gosub continue:
if a$=b$ then
cls
end
endif
if extended=0 then wait58:
if a$=";" then
width 80
goto menu:
endif
if a$="<" then prfile40:
if a$="=" then menu40:
if a$=">" then help40:
goto wait58:
rem Here is the routine for deleting files in 40-column mode.
killfl40:
width 40
print "Delete Files"
print
print
print "Before going any further, you should"
print "be aware that, once a file has been"
print "deleted, it is very difficult to"
print "retrieve it. From this program, it is"
print "impossible; I lack the skill to make"
print "an undelete feature available."
print
print
print "Press any key to continue, or Esc to"
print "quit. ";
gosub continue:
if a$=b$ then menu40:
delagn40:
cls
print "Delete Files"
print
print
spaces$=space$(30)
print spaces$;
color 0,7
print "Esc=Quit"
color 7,0
print "File to delete? ";
gosub retypf40:
realfile$=ucase$(file$)
print ""
print ""
print ""
print "All the data in ";
print realfile$;
print " will be de-"
print "stroyed."
print
print
print "Press any key to continue, or Esc to"
print "quit. ";
gosub continue:
if a$=b$ then menu40:
rekill40:
kill file$
if error=2 then noflkf40:
if error=5 then ilglkf40:
print ""
print ""
print realfile$;
print " has been deleted."
file$=""
print
print "Delete another? (y/n) ";
wait15:
gosub continue:
if a$="y" then delagn40:
if a$="Y" then delagn40:
if a$="n" then menu40:
if a$="N" then menu40:
goto wait15:
rem This is the end of the routine for deleting files in 40-column mode.
rem Here is the routine for making a directory in 40-column mode.
makedr40:
width 40
print "Make a Directory"
print
print
spaces$=space$(30)
print spaces$;
color 0,7
print "Esc=Quit"
color 7,0
print "Directory name (include drive and"
print "path)? ";
gosub retypf40:
directory$=file$
realdir$=ucase$(directory$)
remake40:
mkdir directory$
if error=3 then nopIfFint "tination (include drive and path)? ";
gosub retypefi:
file2$=f le:
c7Skectory"
print
print realfile$;
print # 2, line$ nonull
print # 2, crlf$ nonull
goto wait26:
ctoryi files will copy properly using this"
print "method. Files with an extension of .EXE, .COM, or which contain other"
print "special characters will usually not copy properly."
print
print "Press any key to continue. ";
gosub continue:
copymore:
cls
spaces$=space$(68)
print spaces$;
color 0,7
prinmkdir directon mot realfile$;
print 1in40:
i bese$(file1$)
print ""
print "Destination (are urged"
print "to make backups before attempting any procedu """
kror=3 thet spaces$st oe drive and path)?cls
spaces$=space$(68)
print spaces$;
color 0,7
prinmkdir diri:
file2$=file$
realfil2$=ucase$(file2$)
open "i",1,file1$
lf
if error=99 then copydone:
if error=96 then
print # 2, line$ nonull
input # 1, line$ crlf
if line$="" then
print # 2, ccrlf$ nonull
goto wait3:
endif
endif
print # 2, line$ nonu{ ""
file/;
gobhen tiint " h a,th an ext
copydone:
close 1
close 2
print ""
print ""
print realfil1$:
if a$="=" then menu40:
if a$=">" then help40:
goto wait5 menu2 ying the original file. You are u